package com.example.androidhive;

import java.util.HashMap;
import java.util.Map;

public class Pokoj {
	//_TV,_WIFI,_SUSZARKA,_PRALKA;
	//"UMYWALKA":"0","PRALKA":"1","KLIENT":"78","ID_OBIEKTU":"9","SUSZARKA":"1","WIFI":"0","TV":"1","PRYSZNIC":"0"
	Map<String,Boolean> mm=new HashMap<String,Boolean>();
	boolean[] _elementy={false,false,false,false};
	String[] elementy={"TV","WIFI","SUSZARKA","PRALKA"};
	String _id,_id_obiektu;
	public Pokoj(String ciag){
		String[] d=ciag.split(",");
		boolean c=false;int a=0;
		for (int i = 0; i < d.length; i++) {
			//String z=elementy[a];
			d[i]=d[i].replace("\"", "");
			String[] y=d[i].split(":");
			if(d[i].equals("ID_OBIEKTU"))
				_id_obiektu= y[1];
			if(d[i].equals("KLIENT"))
				_id= y[1];
			mm.put(y[0], (y[1].equals("0"))?true:false);
			//if (y[0].equals(z)){
				//c=(y[1].equals("0"))?true:false;}
		}
		//return c;
	}
}
